package com.cwz.gulimall.authserver.vo;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@Data
public class UserRegisterVo {
    @NotEmpty(message = "用户名不能为空")
    @Length(min = 6, max = 18, message = "用户名6~18")
    private String userName;
    @NotEmpty(message = "密码不能为空")
    @Length(min = 6, max = 18, message = "密码6~18")
    private String password;
    @NotEmpty
    @Pattern(regexp = "^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\\d{8}$",message = "手机号格式不对")
    private String mobile;
    @NotEmpty
    private String code;
}
